import curses

class SuperMenu:

    global option_num
    global menu_window

    def __init__(self, window):
	global menu_window
	global option_num
	option_num = 0
	menu_window = window
	self.addInterface()

    def addOption(self, option_text):
	global option_num 
	global menu_window
	option_num += 1
	menu_window.addstr(option_num, 1, "%s - %s"% (option_num,option_text))
    
    def addExitOption(self):
	global option_num
	global menu_window
	menu_window.addstr(option_num + 2, 1, "x - Exit system")
	#menu_window.refresh()

    def addBackOption(self):
	global option_num
	global menu_window
	window.addstr(option_num + 2, 1, "b - Go back")

    def selection(self, key_input):
	if key_input == "x":
	    return 1
	else:
	    return self.keyInput(key_input)
	    

    def keyInput(self, key_input):
	return 0

    def build(self):
	global menu_window
	menu_window.refresh()

    def addInterface(self):
	#Override this
	return 0
